<html layout:decorator="public/layout" xmlns:miguo="http://www.w3.org/1999/html">
<div layout:fragment="content">
<style type="text/css">
	.layui-form-label {
		float: left;
		display: block;
		padding: 9px 15px;
		padding-top: 9px;
		padding-bottom: 9px;
		width: 120px;
		font-weight: 400;
		line-height: 20px;
		text-align: right;
	}
	.layui-input-block {
		margin-left: 150px;
		min-height: 36px;
	}
</style>
<div class="layui-tab layui-tab-brief"  style="width: 665px;">
	<widget:tabSelect name="tabId|name|id" sql="SELECT id, `name` FROM sys_config WHERE mark=1 ORDER BY sort ASC;" th:value="${tabId}?:0" href="/configweb/index"/>
	<div class="layui-tab-content">
		<form class="layui-form model-form" action="/configweb/configEdit">
			<div class="layui-form-item" th:each="item:${configList}">
				<label class="layui-form-label"><p th:text="${item['title']}+'：'"></p></label>
			<div th:class="${item['type']}=='image' ? '' : 'layui-input-block'" th:switch="${item.type}">
				<th th:case="hidden">
					<!-- 隐藏域 -->
					<input th:name="${item['code']}" type="hidden" th:value="${item['value']}">
				</th>
				<th th:case="readonly">
					<!-- 只读文本 -->
					<input th:name="${item['code']}" readonly="readonly" th:value="${item['value']}" lay-verify="" autocomplete="off" th:placeholder="'请输入'+${item['title']}" class="layui-input" type="text">
				</th>
				<th th:case="number">
					<!-- 数字文本 -->
					<input th:name="${item['code']}" th:value="${item['value']}" lay-verify="required|number" autocomplete="off" th:placeholder="'请输入'+${item['title']}" class="layui-input" type="text">
				</th>
				<th th:case="text">
					<!-- 单行文本 -->
					<input th:name="${item['code']}" th:value="${item['value']}" lay-verify="required" autocomplete="off" th:placeholder="'请输入'+${item['title']}" class="layui-input" type="text">
				</th>
				<th th:case="textarea">
					<!-- 多行文本 -->
					<textarea th:name="${item['code']}" th:placeholder="'请输入'+${item['title']}" class="layui-textarea" th:text="${item['value']}"></textarea>
				</th>
				<th th:case="password">
					<!-- 密码文本 -->
					<input th:name="${item['code']}" th:value="${item['value']}" th:placeholder="'请输入'+${item['title']}" autocomplete="off" class="layui-input" type="password">
				</th>
				<th th:case="radio">
					<!-- 单选按钮 -->
					<widget:radioSelect th:name="${item['code']}+'|name|id'" th:data="${item['options']}" th:value="${item['value']}"/>
				</th>
				<th th:case="checkbox">
					<!-- 复选框按钮 -->
					<widget:checkboxSingleSelect th:name="${item['code']}+'|name|id'" th:data="${item['options']}" th:value="${item['value']}"/>
				</th>
				<th th:case="select">
					<!-- 下拉单选框架 -->
					<widget:singleSelect th:name="${item['code']}+'|0|'+${item['title']}+'|name|id'" th:data="${item['options']}" th:value="${item['value']}?:1"/>
				</th>
				<th th:case="multiple">
					<!-- 下拉多选框架 -->
					<widget:xmSelect th:name="${item['code']}+'|1|'+${item['title']}+'|name|id|pid'" th:data="${item['options']}" th:value="${item['value']}"/>
				</th>
				<th th:case="icon">
					<!-- 图标 -->
					<widget:iconPicker th:name="${item['code']}" th:value="${item['value']}?:'layui-icon-home'"/>
				</th>
				<th th:case="date">
					<!-- 日期选择 -->
					<widget:dateSelect th:name="${item['code']}+'|'+${item['title']}+'|date'" th:value="${item['value']}"/>
				</th>
				<th th:case="datetime">
					<!-- 时间选择 -->
					<widget:dateSelect th:name="${item['code']}+'|'+${item['title']}+'|datetime'" th:value="${item['value']}"/>
				</th>
				<th th:case="image">
					<!-- 单图上传 -->
					<widget:uploadSingleImage th:name="${item['code']} + '__upimage|'+${item['title']}+'|90x90|config|建议上传尺寸450x450|450x450'" th:value="${item['value']}"/>
				</th>
				<th th:case="images">
					<!-- 多图上传 -->
					<widget:uploadMultipleImage th:name="${item['code']} + '__upimgs|'+${item['title']}+'|90x90|config|10'" th:value="${item['value']}"/>
				</th>
				<th th:case="file">
					<!-- 单文件上传 -->
					<widget:uploadFile th:name="${item['code']}+'|'+${item['title']}+'|config|5|xls,xlsx,doc,docx|10*1024'" th:value="${item['value']}" />
				</th>
				<th th:case="files">
					<!-- 多文件上传 -->
					<widget:uploadFile th:name="${item['code']}+'|'+${item['title']}+'|config|5|xls,xlsx,doc,docx|10*1024'" th:value="${item['value']}" />
				</th>
				<th th:case="ueditor">
					<!-- 富文本 -->
					<textarea th:name="${item['code']}" th:placeholder="'请输入'+${item['title']}" class="layui-textarea" th:text="${item['value']}"></textarea>
					<widget:kindEditor th:name="${item['code']}" type="default" dirname="config" width="100%" height="350"/>
				</th>
			</div>
			</div>
			<widget:btnSubmit name="submit|立即保存"/>
		</form>
	</div>
</div>
</div>
</html>